package com.finer.remote.sell;

import com.finer.entity.sell.FinerSaleBackDetail;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

/**
 * 销售退货详情表(FinerSaleBackDetail)表控制层
 *
 * @author makejava
 * @since 2024-10-21 10:20:39
 */
@RestController
@RequestMapping("finerSaleBackDetail")
public interface FinerSaleBackDetailRemote {

    /**
     * 分页查询
     *
     * @param finerSaleBackDetail 筛选条件
     * @param pageRequest      分页对象
     * @return 查询结果
     */
    @GetMapping
    public ResponseEntity<Page<FinerSaleBackDetail>> queryByPage(FinerSaleBackDetail finerSaleBackDetail, PageRequest pageRequest);

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("{id}")
    public ResponseEntity<FinerSaleBackDetail> queryById(@PathVariable("id") Integer id);

    /**
     * 新增数据
     *
     * @param finerSaleBackDetail 实体
     * @return 新增结果
     */
    @PostMapping
    public ResponseEntity<FinerSaleBackDetail> add(FinerSaleBackDetail finerSaleBackDetail);

    /**
     * 编辑数据
     *
     * @param finerSaleBackDetail 实体
     * @return 编辑结果
     */
    @PutMapping
    public ResponseEntity<FinerSaleBackDetail> edit(FinerSaleBackDetail finerSaleBackDetail);

    /**
     * 删除数据
     *
     * @param id 主键
     * @return 删除是否成功
     */
    @DeleteMapping
    public ResponseEntity<Boolean> deleteById(Integer id);

}

